package com.Langrui;

import lore.miniwechat.utils.IdWorker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class App {
    public static void main(String[] args) {
        SpringApplication.run(App.class);
    }

    //创建一个全局的id生成器
    @Bean
    public IdWorker createIdWorker(){
        return new IdWorker(1,1);
    }
}
